package day1;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class StrTest2 {
    public static void main(String[] args) {
        String s="MrTang是个大帅哥";
        System.out.println("s的长度："+s.length());
        char c = s.charAt(s.length()-2);
        System.out.println(c);
        Scanner in=new Scanner(System.in);
        System.out.println("Qingbshru 性别：");
        char sex=in.next().charAt(0);
        System.out.println(sex);
    }
}
